home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / JAVA_UTL / HYPERPRO / SRC / PVS / UTILS / COMPARAT.JAV < prev    next >
Encoding:
Text File  |  1996-09-14  |  1.0 KB  |  43 lines

  1. package PVS.Utils;
  2. /*
  3.   File: Comparator.java
  4.  
  5.   Originally written by Doug Lea and released into the public domain. 
  6.   Thanks for the assistance and support of Sun Microsystems Labs, Agorics 
  7.   Inc, Loral, and everyone contributing, testing, and using this code.
  8.  
  9.   History:
  10.   Date     Who                What
  11.   24Sep95  dl@cs.oswego.edu   Create from collections.java  working file
  12.  
  13. */
  14.   
  15. //package collections;
  16.  
  17. /**
  18.  *
  19.  * Comparator is an interface for any class possessing an element
  20.  * comparison method.
  21.  * @author Doug Lea
  22.  * @version 0.93
  23.  *
  24.  * <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.
  25.  *
  26. **/
  27.  
  28. public interface Comparator {
  29.  
  30. /**
  31.  * Compare two Objects with respect to ordering. Typical
  32.  * implementations first cast their arguments to particular
  33.  * types in order to perform comparison
  34.  *
  35.  * @param fst first argument
  36.  * @param snd second argument
  37.  * @return a negative number if fst is less than snd; a
  38.  * positive number if fst is greater than snd; else 0
  39. **/
  40.   public int        compare(Object fst, Object snd); 
  41. }
  42.  
  43.